// Plotter.h - MARIN MSG Anneke Sicherer-Roetman 200xyyzz

#ifndef PLOTTER_H
#define PLOTTER_H

#include <string>
#include "Array2D.h"

/// base class for plotters
class Plotter
{
    
public:
    
    Plotter(int xmin, int ymin, int xmax, int ymax, const Array2D<float> &plot, const std::string &caption);
    
    virtual ~Plotter();

    /// should be overloaded, default does nothing
    virtual void plot() {}
    
    /// should be overloaded, default does nothing
    virtual void run()  {} // do nothing

protected:
    
    int                   m_xmin;    ///< lower left of plotted area
    int                   m_ymin;    ///< lower left of plotted area
    int                   m_xmax;    ///< upper right of plotted area
    int                   m_ymax;    ///< upper right of plotted area
    const Array2D<float> &m_data;    ///< data to plot
    const std::string    &m_caption; ///< text to display
    
private:
    
    // should never be called
    /// @cond nevercall
    Plotter();
    Plotter(const Plotter& m);
    Plotter& operator = (const Plotter& m);
    /// @endcond
    
};

#endif // PLOTTER_H
